package com.jr9z.jrjz.config;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.web.servlet.MultipartConfigFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import javax.servlet.MultipartConfigElement;

@Configuration
public class MvcConfig implements WebMvcConfigurer {

   /* @Autowired
    private FileUploadProperties fileUploadProperties;*/

    @Override
    public void addViewControllers(ViewControllerRegistry registry) {
       //主体框架
//        registry.addViewController("/index.html").setViewName("index");
        registry.addViewController("/").setViewName("index");
//        registry.addViewController("/ts/newsManage.html").setViewName("/news/newsManage");
//        registry.addViewController("/ts/recruitGetTest.html").setViewName("/recruit/recruitGetTest");
        registry.addViewController("/ts/fulx.html").setViewName("fulx");
        registry.addViewController("/ts/fulx-bpds.html").setViewName("fulx-bpds");
        registry.addViewController("/ts/fulx-jgjz.html").setViewName("fulx-jgjz");
        registry.addViewController("/ts/fulx-jqca.html").setViewName("fulx-jqca");
        registry.addViewController("/ts/fulx-lygh.html").setViewName("fulx-lygh");
        registry.addViewController("/ts/fulx-qyly.html").setViewName("fulx-qyly");
        registry.addViewController("/ts/fulx-slgy.html").setViewName("fulx-slgy");
        registry.addViewController("/ts/fulx-tsxz.html").setViewName("fulx-tsxz");
        registry.addViewController("/ts/fulx-xywh.html").setViewName("fulx-xywh");
        registry.addViewController("/ts/fulx-xq.html").setViewName("fulx-xq");
//
        registry.addViewController("/ts/gywm.html").setViewName("gywm");
        registry.addViewController("/ts/qywh.html").setViewName("qywh");
        registry.addViewController("/ts/ryzz.html").setViewName("ryzz");
        registry.addViewController("/ts/zjtd.html").setViewName("zjtd");
//
        registry.addViewController("/ts/jdal.html").setViewName("jdal");
        registry.addViewController("/ts/jdal-xq.html").setViewName("jdal-xq");
        registry.addViewController("/ts/wyly.html").setViewName("wyly");

        registry.addViewController("/ts/ssdt.html").setViewName("ssdt");
        registry.addViewController("/ts/xwdt-xq.html").setViewName("xwdt-xq");
        registry.addViewController("/ts/hyjj.html").setViewName("hyjj");
        registry.addViewController("/ts/hyjj-xq.html").setViewName("hyjj-xq");
        registry.addViewController("/ts/zpfb.html").setViewName("zpfb");
        registry.addViewController("/ts/zpfb-xq1.html").setViewName("zpfb-xq");
        registry.addViewController("/admin.html").setViewName("admin");
//        这里是一个测试
        registry.addViewController("/ts/test.html").setViewName("test");
    }

   /* @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        registry.addResourceHandler(fileUploadProperties.getStaticAccessPath())
                .addResourceLocations("file:"+fileUploadProperties.getUploadFolder()+"/");
    }*/


}